<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="test">
    <h2>显示格式化的日期时间</h2>
    <p>开始时间: {{ start }}</p>
    <p>开始时间: {{ start | dateFormat}}</p>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/moment.js"></script>
  <script>
    //自定义一个过滤器
    Vue.filter('dateFormat', function(value) {
      return moment(value).format('YYYY-MM-DD HH:mm:ss');
    })
    new Vue({
      el: '#test',
      data: {
        start: Date.now() - 100000
      }
    })
  </script>
</body>
</html>